package com.iot08.admin.config.mob;

import lombok.extern.slf4j.Slf4j;
import mob.push.api.config.MobPushConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @version 1.0
 * @Description: mob配置初始化
 * @time: 2020/12/30 18:07
 * @author: Rock
 */
@Slf4j
@Configuration
public class MobConfig {

    @Value("${mob.push.key}")
    private String appKey;

    @Value("${mob.push.secret}")
    private String appSecret;

    /**
     * @time: 2020/12/30 18:10
     * @author: Rock
     * @version 1.0
     */
    @Bean
    public void initConfig() {
        //初始化mob配置
        MobPushConfig.appkey = appKey;
        MobPushConfig.appSecret = appSecret;
        log.info("appkey = {}", MobPushConfig.appkey);
        log.info("appSecret = {}", MobPushConfig.appSecret);
    }
}
